<?php

namespace Admin\Form;

use Zend\Form\Form;

class MenuForm extends Form
{
    public function __construct($name = null)
    {
        // we want to ignore the name passed
        parent::__construct('menu');
        $this->setAttribute('method', 'post');
        $this->add(array(
            'name' => 'id',
            'attributes' => array(
                'type'  => 'hidden',
                'class'=>'form-control'
            ),
        ));
        $this->add(array(
        		'name' => 'name',
        		'type' => 'Text',
        		'attributes' => array(
        				'id' => 'name',
        				'class' => 'form-control',
        				'required' => 'required',
        		)
        ));
        $this->add(array(
            'name' => 'desc',
            'type' => 'Text',
            'attributes' => array(
                'id' => 'desc',
                'class' => 'form-control'
            )
        ));

        $this->add(array(
            'name' => 'submit',
            'attributes' => array(
                'type'  => 'submit',
                'value' => 'Go',
                'id' => 'submitbutton',
            ),
        ));
    }


}